package com.itheima.Demo;

import java.util.Random;
import java.util.Scanner;

public class Test3 {
    public static void main(String[] args) {
        int[] arr = new int[5];
        Scanner r = new Scanner(System.in);
        for (int i = 0; i < arr.length; i++) {
            System.out.println("请您输入第" + (i + 1) + "个员工的工号：");
            int insert = r.nextInt();
            arr[i] = insert;
        }
        Random ra = new Random();
        for (int i = 0; i < arr.length; i++) {
            int index = ra.nextInt(0, arr.length);
            int temp = arr[index];
            arr[index] = arr[i];
            arr[i] = temp;
        }
        for (int i = 0; i < arr.length; i++) {
            System.out.print(arr[i]+" ");
        }
    }
}
